<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/index/tab.css" />
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			
			.title {
				padding: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
				background-color: #fff;
			}
		</style>
	</head>

	<body>
		<div id="pullrefresh" class="mui-content">
			<div class="mui-content">
			  <div class="mui-row box-top" id="reback">
			        <div class="mui-col-sm-6 mui-col-xs-12 title-box">
			            <i class="mui-icon mui-icon-back"></i>
			        </div>
			        <div class="mui-col-sm-6 mui-col-xs-12">
			        </div>
			    </div>
			</div>
			<div class="mui-scroll-wrapper box-img">
				<div id="imgs" class="mui-scroll">
					
				</div>
			</div>
			<!--  -->
			<div class="caremam-btn-con">
				<div class="mui-row box-top" id="reback">
			        <div class="mui-col-sm-12 mui-col-xs-12">
			            <button type="button" class="mui-btn mui-btn-success" id="blool">动画</button>
			        </div>
			 	</div>
			</div>

		</div>
		<script src="../js/mui.min.js"></script>
		<script>
			 mui('.mui-scroll-wrapper').scroll({
		    	 scrollY: true, //是否竖向滚动
				 scrollX: false, //是否横向滚动
				 startX: 0, //初始化时滚动至x
				 startY: 0, //初始化时滚动至y
				 indicators: false, //是否显示滚动条
				 deceleration:0.0006 //阻尼系数,系数越小滑动越灵敏
			})
			document.getElementById('reback').addEventListener('tap', function() {
				mui.back()
			})
			
			document.getElementById('blool').addEventListener('tap', function() {
				var IntentMana = plus.android.importClass('android.content.Intent')
			    var MediaStore = plus.android.importClass('android.provider.MediaStore')
			    var App = plus.android.runtimeMainActivity()
			    var Uri = plus.android.importClass('android.net.Uri')
			    var FILE = plus.android.importClass('java.io.File')
			    var intent = new IntentMana(MediaStore.ACTION_IMAGE_CAPTURE)
			    var vfile = new FILE('/storage/emulated/0/my/test/img.jpg')
			    if (!vfile.exists()) {
			      var vDirPath = vfile.getParentFile()
			      vDirPath.mkdirs()
			    } else {
			      
			    }
			    var uri = Uri.fromFile(vfile)
			    intent.putExtra(MediaStore.EXTRA_OUTPUT, uri) //
			    App.startActivityForResult(intent, 100)
			})
			
			//打开相册
			// 扩展API加载完毕后调用onPlusReady回调函数 
			document.addEventListener( "plusready", onPlusReady, false );
			// 扩展API加载完毕，现在可以正常调用扩展API 
			function onPlusReady() {
			}
			// 从相册中选择图片 
			function galleryImg() {
				// 从相册中选择图片
				console.log("从相册中选择图片:");
			    plus.gallery.pick( function(path){
			    	console.log(path);
			    }, function ( e ) {
			    	console.log( "取消选择图片" );
			    }, {filter:"image"} );
			}
			

		</script>
	</body>

</html>